import request from '@/utils/request'

export function listHerb() {
  return request({
    url: '/herb/list',
    method: 'get'
  })
}


export function deleteHerb(data) {
  return request({
    url: '/herb/delete',
    method: 'post',
    data
  })
}

export function batchDelete(data) {
  return request({
    url: '/herb/batchDelete',
    method: 'post',
    data
  })
}

export function batchPublish(data) {
  return request({
    url: '/herb/batchPublish',
    method: 'post',
    data
  })
}

export function publishHerb(data) {
  return request({
    url: '/herb/create',
    method: 'post',
    data
  })
}

export function detailHerb(id) {
  return request({
    url: '/herb/detail',
    method: 'get',
    params: { id }
  })
}

export function editHerb(data) {
  return request({
    url: '/herb/update',
    method: 'post',
    data
  })
}




